package cn.zjyj.module.zjyj.dal.mysql.riskapplyrecord;

import cn.zjyj.framework.common.common.pojo.PageResult;
import cn.zjyj.framework.datasource.mybatis.core.query.LambdaQueryWrapperX;
import cn.zjyj.framework.datasource.mybatis.core.mapper.BaseMapperX;
import cn.zjyj.module.zjyj.dal.dataobject.riskapplyrecord.RiskAssessmentApplyRecordDO;
import org.apache.ibatis.annotations.Mapper;
import cn.zjyj.module.zjyj.controller.admin.riskapplyrecord.vo.*;

/**
 * 风险申请记录 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface RiskAssessmentApplyRecordMapper extends BaseMapperX<RiskAssessmentApplyRecordDO> {

    default PageResult<RiskAssessmentApplyRecordDO> selectPage(RiskAssessmentApplyRecordPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<RiskAssessmentApplyRecordDO>()
                .betweenIfPresent(RiskAssessmentApplyRecordDO::getCreateTime, reqVO.getCreateTime())
                .eqIfPresent(RiskAssessmentApplyRecordDO::getIdentifyId, reqVO.getIdentifyId())
                .eqIfPresent(RiskAssessmentApplyRecordDO::getStatus, reqVO.getStatus())
                .orderByDesc(RiskAssessmentApplyRecordDO::getId));
    }

}